package com.whz.workmanageol.controller;

import com.github.pagehelper.PageInfo;
import com.whz.workmanageol.entity.Teacher;
import com.whz.workmanageol.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

//@RestController
@RequestMapping("/admin")
public class UserInfoController {
    @Autowired
    private AdminService adminService;
    // 教师信息管理部分

    @ResponseBody
    @GetMapping(value = "/teacherinfo")
    public PageInfo<Teacher> teacherinfo(@RequestParam(required = false, defaultValue = "0") Integer pageNum, Model model){
        return adminService.teacherList(pageNum);
    }

}
